<template>
  <div class="quotationExpanded">
    <c-desc :data="data" :columns="descriptions">
      <template v-slot:createDate>
        <span>{{ $getTime(data.createDate) }}</span>
      </template>
    </c-desc>
    <!-- <div v-for="item in descriptions" class="desc-item">
      <template v-if="item.slot">
        <span class="label">{{item.label}}：</span>
        <span>{{ $getTime(data.createDate) }}</span>
      </template>
      <template v-else>
        <span class="label">{{item.label}}：</span>
        <span>{{data[item.prop]}}</span>
      </template>
    </div> -->
  </div>
</template>

<script>
export default {
  props: {
    data: {
      type: Object,
      default: () => {
        return {};
      }
    }
  },
  data() {
    return {
      descriptions: [
        {
          label: "发布人",
          prop: "createUsername"
        },
        {
          label: "发布时间",
          prop: "createDate",
          slot: "createDate"
        },
        {
          label: "交货方式",
          prop: "deliveryType"
        },
        {
          label: "开票方式",
          prop: "invoiceType"
        },
        {
          label: "结算方式",
          prop: "settlementType"
        },
        {
          label: "下单倍数",
          prop: "rateLimit"
        },
        {
          label: "备注",
          prop: "remark"
        }
      ]
    };
  }
};
</script>

<style lang="scss" scoped>
.desc-item {
  display: inline-flex;
  width: 265px;
  padding: 0 20px 20px 0;
}
</style>
